package cc.bookcloud.tool.ocr.common.parsetext.feature;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;

/**
 * @Desc: @todo
 * @Version: 2.0
 * @Author: John Goo
 * @Date: 2024/12/05 09:30
 **/
@Data
public class OcrTextInvoicePartitionEntity {

    // 发票类型
    private String type;
    // 发票描述
    private String typeDesc;

    // text 数组
    private JSONArray ocrRet = new JSONArray();


    public void addRow(int seq,String text,JSONArray points){
        JSONObject row = new JSONObject();
        row.put("idx_" + (seq + 1), (seq + 1));
        row.put("points",points);
        row.put("text", text);
        ocrRet.add(row);
    }
}
